const mongoose = require('mongoose');
let cartSchema = new mongoose.Schema({
    num:{
        type:Number,
        required:true
    },
    checked:{   // 生成订单后改为true 默认false
        type:Boolean,
        required:true,
        default:false
    },
    prod:{
        type: String,
        required: true,
        ref: 'prod'
    },
    uid:{
        type:String,
        required:true
    }
});
let Cart = mongoose.model('cart', cartSchema);
module.exports = Cart;
